package br.com.treinar.modelo.principal;

import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;

import br.com.treinar.dao.ContatoDAO;
import br.com.treinar.modelo.Contato;

public class TesteDAO {

	public static void main(String[] args) {
		EntityManagerFactory factory = Persistence.createEntityManagerFactory("treinar_modelo");
		EntityManager manager = factory.createEntityManager();
		ContatoDAO dao = new ContatoDAO(manager);
		Contato c = dao.selectById(3l);
		System.out.println(c);
	}
	
}
